﻿namespace Medical.Api.Read.Dto.WmsDto.WmsStorageDto
{
    public class StorageQueryDto
    {
        /// <summary>
        /// 入库编号
        /// </summary>
        public string? StorageCode { get; set; }

        /// <summary>
        /// 页码(默认1)
        /// </summary>
        public int PageIndex { get; set; } = 1;

        /// <summary>
        /// 每页数量(默认10)
        /// </summary>
        public int PageSize { get; set; } = 10;

        /// <summary>
        /// 入库状态(0:禁用 1:启用)
        /// </summary>
        public bool? AuditState { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }
    }

    /// <summary>
    /// 入库详情DTO
    /// </summary>
    public class WmsStorageDetailDto
    {
        public int Id { get; set; }
        public string? StorageCode { get; set; }
        public int StorageType { get; set; }
        public string StorageTypeName { get; set; }
        public int Warehouse { get; set; }
        public string WarehouseName { get; set; }
        public int Supplier { get; set; }
        public string SupplierName { get; set; }
        public string? StorageExplain { get; set; }
        public bool AuditState { get; set; }
        public string? AuditName { get; set; }
        public DateTime? AuditDate { get; set; }
        public DateTime CreateTime { get; set; }
        public List<WmsStorageDetailItemDto> Details { get; set; }
    }

    /// <summary>
    /// 入库明细DTO
    /// </summary>
    public class WmsStorageDetailItemDto
    {
        public int Id { get; set; }
        public int MaterialId { get; set; }
        public int MaterialType { get; set; }
        public string MaterialTypeName { get; set; }
        public string? MaterialCode { get; set; }
        public string? MaterialName { get; set; }
        public int StorageNum { get; set; }
        public string? MaterialSpecs { get; set; }
        public decimal MaterialPrice { get; set; }
        public string? RegisterNo { get; set; }
        public DateTime ProduceDate { get; set; }
        public DateTime SterilizaDate { get; set; }
        public DateTime LapseDate { get; set; }
    }

    public class WmsStoragePageDto
    {
        public int Id { get; set; }
        public string? StorageCode { get; set; }
        public int StorageType { get; set; }
        public string StorageTypeName { get; set; }
        public int Warehouse { get; set; }
        public string WarehouseName { get; set; }
        public int Supplier { get; set; }
        public string SupplierName { get; set; }
        public string? StorageExplain { get; set; }
        public bool AuditState { get; set; }
        public string? AuditName { get; set; }
        public DateTime? AuditDate { get; set; }
        public DateTime CreateTime { get; set; }
    }
}
